from scholarly import scholarly

# 搜索关键词
search_query = scholarly.search_pubs('machine learning')
for result in search_query:
    print(result['title'], result['citation_count'])

# 查询单篇文献
pub = scholarly.search_single_pub('attention is all you need')
print(pub['author'], pub['year'])
